package com.ibm.cps.jarxs;

import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;

@Path(ParaUtility.Publisher)
public interface PublisherResource {

	// ../Publishers/{tenantId}
	@GET
	@Path(ParaUtility.TenantFormat)
	Response GetPublishers(@PathParam(ParaUtility.TenantField) String tenantid,@Context UriInfo info,
			@HeaderParam(ParaUtility.auth) String key);
	
	// ../Publishers/{tenan}/{pub_name}
	@GET
	@Path(ParaUtility.TenantFormat + "/" + ParaUtility.Pub_format)
	Response GetPublisher(@PathParam(ParaUtility.TenantField) String tenantid,
			@PathParam(ParaUtility.Pub_field) String pub_name,
			@HeaderParam(ParaUtility.auth) String key);
	
	// ../Publisher/{tenan}/{pub_name}
	@PUT
	@Consumes(MediaType.APPLICATION_JSON)
	@Path(ParaUtility.TenantFormat + "/" + ParaUtility.Pub_format)
	Response PutPublisher(@PathParam(ParaUtility.TenantField) String tenantid,
			@PathParam(ParaUtility.Pub_field) String pub_name,
			@HeaderParam(ParaUtility.auth) String key);
	
	// ../Publisher/{tenant}
	@POST
	@Consumes(MediaType.APPLICATION_JSON)
	@Path(ParaUtility.TenantFormat)
	Response PostPublisher(@PathParam(ParaUtility.TenantField) String tenantid,String json,
			@HeaderParam(ParaUtility.auth) String key);
	
	//. ../Publisher/{ten}
	@DELETE
	@Path(ParaUtility.TenantFormat)
	Response DeletePublishers(@PathParam(ParaUtility.TenantField) String tenantid,
			@HeaderParam(ParaUtility.auth) String key);
	
	// ../pub/{ten}/{pub}
	@DELETE
	@Path(ParaUtility.TenantFormat + "/" + ParaUtility.Pub_format)	
	Response DeletePublisher(@PathParam(ParaUtility.TenantField) String tenantid,
			@PathParam(ParaUtility.Pub_field) String pub_name,
			@HeaderParam(ParaUtility.auth) String key);
	
	
}
